//
//  messageCell.m
//  pacc
//
//  Created by 测试 on 2018/5/21.
//  Copyright © 2018年 测试. All rights reserved.
//

#import "messageCell.h"

@implementation messageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
-(void)setFrame:(CGRect)frame{
    frame.size.height -= ZTmargin;
    frame.origin.x += ZTmargin;
    frame.origin.y += ZTmargin;
    frame.size.width -=2*ZTmargin;
    [super setFrame:frame];
}
-(void)setArrData:(messageModel *)arrData{
    NSString *jsonString = [NSString stringWithFormat:@"%@",arrData.content];
    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
    NSError *err;
    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
    _messageLabel.text = [dic objectForKey:@"content"];
    self.zid = [dic objectForKey:@"urlparam"];
    _urlType =[dic objectForKey:@"urlType"];
    self.msgid = arrData.msgid;
    self.msgStatus =  [NSString stringWithFormat:@"%@", arrData.msgStatus];
    if ([self.msgStatus isEqualToString:@"2"]) {
        [_messageLabel setTextColor:basetextColor];
    }else [_messageLabel setTextColor:RGB(122, 122, 122)];
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
